package com.woniu.user.controller;

import com.woniu.common.pojo.Type;
import com.woniu.common.vo.AjaxResult;
import com.woniu.user.service.TypeService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/Types")
@CrossOrigin
public class TypeController {
    @Resource
    private TypeService typeService;

    @RequestMapping("findAll")
    public AjaxResult findAll() {
        List<Type> typeList = typeService.getTypeList();
        return AjaxResult.success("类型准备完毕:",typeList);
    }

}
